package com.usian.admin.controller.v1;

import com.usian.admin.service.AdSensitiveService;
import com.usian.apis.admin.AdSensitiveControllerApi;
import com.usian.model.admin.dtos.SensitiveDto;
import com.usian.model.common.dtos.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author baimugudu
 * @email 2415621370@qq.com
 * @date 2023/8/23 14:34
 */
@RestController
@RequestMapping("/api/v1/channel")
@Api(value = "敏感词管理" ,tags = "Sensitive", description = "敏感词管理API")
public class AdSensitiveController implements AdSensitiveControllerApi {


    @Autowired
    AdSensitiveService adSensitiveService;


    @Override
    @PostMapping("/findSensitive")
    @ApiOperation(value = "查询敏感词信息",notes = "根据名称分页查询敏感词列表")
    @ApiImplicitParam(name = "sensitiveDto",type ="SensitiveDto",value = "敏感词名称")
    public ResponseResult findSensitive(@RequestBody SensitiveDto sensitiveDto) {
        return adSensitiveService.findSensitive(sensitiveDto);
    }
}
